<template>
	<view class="set-shop">
		<view style="margin: 40rpx 26rpx;">
			<view class="title">
				<text>{{i18n.Title}}</text>
				<view>{{i18n.Spot}}</view>
			</view>
			<navigator url="/pages/store/settled/index" class="shops">
				<view class="shops-fl">
					<image style="height: 100%; width: 100%;" src="https://gbay.dcyu.com/uploads/images/business-shop_btn.png" mode=""></image>
				</view>
				<view class="shops-fr">
					<span><text>{{i18n.Shen}}</text><image src="https://gbay.dcyu.com/uploads/images/jzhe.png" mode=""></image></span>
					<view>{{i18n.Da}}</view>
				</view>
			</navigator>
			<navigator url=""  class="person" @click="go">
				<view class="person-fl">
					<image style="height: 100%; width: 100%;" src="https://gbay.dcyu.com/uploads/images/personal-shop_btn.png" mode=""></image>
				</view>
				<view class="person-fr">
					<span><text>{{i18n.Ge}}</text><image src="https://gbay.dcyu.com/uploads/images/jzhe.png" mode=""></image></span>
					<view>{{i18n.He}}</view>
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	const globalData = getApp().globalData;
	import {mystore} from '@/api/store.js';
	export default {
		data() {
			return {
				
			}
		},
		computed: {
		   i18n() {
		    return globalData.$t('setupshop');
		   },
		  },
		  onLoad() {
		  	uni.setNavigationBarTitle({
		  	           title:this.i18n.Title
		  	       })
		  },
		methods: {
			go:function(){
				mystore().then(res=>{
					if(res.status==200){
						if(res.data.open_state==3){
							uni.navigateTo({
								url: `/pages/store/store_type/index`
							})
						}else if(res.data.open_state==4){
							uni.navigateTo({
								url: `/pages/store/supplier_store/index`
							})
						}else if(res.data.open_state==0 || res.data.open_state==1 || res.data.open_state==2){
							uni.navigateTo({
								url: `/pages/store/privatestop/index`
							})
						}
					}
				})
			}
		},
		onShow() {
			
		}
	}
</script>

<style lang="scss">
.title{
	text{ 
		font-size: 44rpx; 
		font-weight: bold;
		}
	view{
		padding-top: 10rpx;
		font-size: 28rpx;
		color: #A5A5A5;
	}
}

.shops{
	margin: 60rpx 0;
}
.shops-fl,
.person-fl{
		width: 50%;
		height: 100%;
	}
.shops-fr,
.person-fr{
	span{
		display: flex;
		align-items: center;
		margin-top: 72rpx;
		text{
			display: inline-block;
			font-weight: bold;
			font-size: 36rpx;
		}
		image{
			margin-left: 24rpx;
			width: 40rpx;
			height: 40rpx;
			border-radius: 50%;
		}
	}
	view{
		justify-content: center;
		padding-top: 10rpx;
		font-weight: 400rpx;
		color: #A5A5A5;
	}
}
.shops,
.person{
	display: flex;
	height: 240rpx;
	border-radius:10px ;
	box-shadow: 0 4rpx 10rpx 5rpx #d6d6d6;
}
</style>
